package com.uzai.console.service.feign;

import com.alibaba.fastjson.JSONObject;
import com.uzai.console.common.UzaiRespVo;
import com.uzai.console.dto.feign.turnlink.*;
import com.uzai.console.service.feign.impl.UzaiTurnlinkFeignFallbackFactory;
import com.uzai.console.vo.feign.turnlink.SimpleTurnlinkVo;
import com.uzai.console.vo.feign.turnlink.TbPartnerurlAnalysisVo;
import com.uzai.console.vo.feign.turnlink.TbPwdAnalysisVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 商品转链微服务
 * @Auther: jianghan
 * @Date: 2021/11/24 16:22
 * @Description:
 */
@Component
@FeignClient(value = "uzai-turnlink-server", fallbackFactory = UzaiTurnlinkFeignFallbackFactory.class)
public interface UzaiTurnlinkFeignService {

    /**
     * 淘宝简版转链
     *
     * @param simpleTurnLinkDtoDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     * @author jitwxs
     * @date 2021/11/29 10:25
     */
    @PostMapping("/tb/turnlink/simple")
    UzaiRespVo<SimpleTurnlinkVo> tbTurnlinkSimple(@RequestBody SimpleTurnLinkDto simpleTurnLinkDtoDto);

    /**
     * 活动转链
     *
     * @param simpleTurnLinkDtoDto
     * @return
     */
    @PostMapping("/tb/activity/url")
    UzaiRespVo<SimpleTurnlinkVo> tbActivityTurnlink(@RequestBody SimpleTurnLinkDto simpleTurnLinkDtoDto);

    /**
     * 京东简版转链
     *
     * @param simpleTurnLinkDtoDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     * @author jitwxs
     * @date 2021/11/29 10:25
     */
    @PostMapping("/jd/turnlink/simple")
    UzaiRespVo<SimpleTurnlinkVo> jdTurnlinkSimple(@RequestBody SimpleTurnLinkDto simpleTurnLinkDtoDto);

    /**
     * 拼多多简版转链
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param simpleTurnLinkDtoDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/pdd/turnlink/simple")
    UzaiRespVo<SimpleTurnlinkVo> pddTurnlinkSimple(@RequestBody SimpleTurnLinkDto simpleTurnLinkDtoDto);

    /**
     * 唯品会简版转链
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param simpleTurnLinkDtoDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/vph/turnlink/simple")
    UzaiRespVo<SimpleTurnlinkVo> vphTurnlinkSimple(@RequestBody SimpleTurnLinkDto simpleTurnLinkDtoDto);

    /**
     * 抖音转链
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param simpleTurnLinkDtoDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/dy/turnlink/simple")
    UzaiRespVo<SimpleTurnlinkVo> dyTurnlinkSimple(@RequestBody SimpleTurnLinkDto simpleTurnLinkDtoDto);

    /**
     * 快手转链
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param simpleTurnLinkDtoDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/ks/turnlink/simple")
    UzaiRespVo<SimpleTurnlinkVo> ksTurnlinkSimple(@RequestBody SimpleTurnLinkDto simpleTurnLinkDtoDto);

    /**
     * 解析淘口令
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param tbPwdAnalysisDto
     * @return com.uzai.console.common.UzaiRespVo<TbPwdAnalysisVo>
     */
    @PostMapping("/tb/pwd/analysis")
    UzaiRespVo<TbPwdAnalysisVo> tbPwdAnalysis(@RequestBody TbPwdAnalysisDto tbPwdAnalysisDto);

    /**
     * 解析第三方工具商的短链接
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param tbPartnerurlAnalysisDto
     * @return com.uzai.console.common.UzaiRespVo<TbPwdAnalysisVo>
     */
    @PostMapping("/tb/partnerurl/analysis")
    UzaiRespVo<TbPartnerurlAnalysisVo> tbPartnerurlAnalysis(@RequestBody TbPartnerurlAnalysisDto tbPartnerurlAnalysisDto);

    /**
     * 生成短链接
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param generateShortUrlDto
     * @return com.uzai.console.common.UzaiRespVo<TbPwdAnalysisVo>
     */
    @PostMapping("/generate/short/url")
    UzaiRespVo<String> generateShortUrl(@RequestBody GenerateShortUrlDto generateShortUrlDto);

    /**
     * 拼多多联盟备案链接（如果已经备案，则返回null）
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param pddTokenRecordDto
     * @return com.uzai.console.common.UzaiRespVo<TbPwdAnalysisVo>
     */
    @PostMapping("/pdd/check/authority")
    UzaiRespVo<String> pddCheckAuthority(@RequestBody PddTokenRecordDto pddTokenRecordDto);

    /**
     * 拼多多获取营销链接(千万补贴链接)
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param pddTokenRecordDto
     * @return com.uzai.console.common.UzaiRespVo<TbPwdAnalysisVo>
     */
    @PostMapping("/pdd/gen/rpurl")
    UzaiRespVo<String> pddGenRpurl(@RequestBody PddTokenRecordDto pddTokenRecordDto);

    /**
     * 查询商品详情
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param itemId
     * @return com.uzai.console.common.UzaiRespVo<Object>
     */
    @PostMapping("/tb/item/info")
    UzaiRespVo<JSONObject> tbItemInfo(@RequestBody String itemId);

    /**
     * 查询淘宝商品优惠券
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param tbPrivilegeDto
     * @return com.uzai.console.common.UzaiRespVo<Object>
     */
    @PostMapping("/tb/privilege/get")
    UzaiRespVo<JSONObject> getTbPrivilege(@RequestBody TbPrivilegeDto tbPrivilegeDto);

}
